package com.gree.flowable.app.services;

import com.gree.flowable.app.pojo.model.*;
import com.gree.flowable.app.pojo.vo.ProcessInstanceQueryVO;
import com.gree.flowable.app.pojo.vo.ProcessInstanceVO;
import com.gree.flowable.app.pojo.vo.ReturnVO;
import org.flowable.engine.runtime.ProcessInstance;

public interface IFlowableProcessInsService {
    /**
     * @Title: 跟踪流程实例图片
     *
     * @param businessKey 业务主键
     * @return
     */
    byte[] createImage(String businessKey);

    /**
     * @Title: 终止流程
     * @param endVo 参数
     * @return
     */
    ReturnVO stopProcessInstanceByKey(EndProcessMO endVo) ;

    /**
     * @Title: 启动流程
     *
     * @param startProcessInstanceMO 参数
     * @return
     */
    ReturnVO<ProcessInstance> startProcessInstanceByKey(StartProcessInstanceMO startProcessInstanceMO);

    /**
     * @Title: 查询我发起的流程实例
     * @param queryVo
     * @param query
     * @return
     */
    PagerModel<ProcessInstanceVO> getMyProcessInstances(ProcessInstanceQueryVO queryVo, Query query);

    /**
     * @Title: 撤回Service
     * @param revokeVo
     * @return
     */
    ReturnVO<String> revokeProcess(RevokeProcessMO revokeVo);

    int countBusinessKey(String businessKey);
}
